/*
 * Vector1D.h
 *
 *  Created on: Apr 9, 2010
 *      Author: andrew
 */

#ifndef VECTOR1D_H_
#define VECTOR1D_H_

#include <stdarg.h>
#include <math.h>

class Vector1D {

	double* x;
	int n;
public:
	Vector1D();
	Vector1D(int size, ...);
	Vector1D(int size, double xarray[]);
	virtual ~Vector1D();
	Vector1D(const Vector1D& copyme);
	Vector1D& operator=(const Vector1D &vObj);

	double& operator()(int i) const;
	Vector1D operator+(const Vector1D& right);
	Vector1D operator-(const Vector1D& right);
	Vector1D operator-(const double right);
	Vector1D operator/(const double right);
	Vector1D operator*(const double right);
	Vector1D cross(const Vector1D& right);
	Vector1D appendVector(Vector1D& a);
	void copy(const double vec[]);
	double* getCopyOfArray() const;
	int length() const { return n; }
	Vector1D remove(int i);
	void initConst(double alpha);
	Vector1D selectEntries(const Vector1D& toSelect);
	void printVector(void) const;
	Vector1D vecNot(int i, int j) const;

};

#endif /* VECTOR1D_H_ */
